package cn.core.tool.mapper;

import cn.core.tool.eo.DataManipulationLog;
import cn.core.tool.eo.Files;
import cn.core.tool.util.Paging;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.Map;

/**
 * mybatis 持久化接口
 */
@Mapper
public interface CoreMapper {

  /**
   * 动态执行sql
   */
  public Object execSql(@Param("sqlStr") String sqlStr, @Param("param") Map<String, Object> param) throws Exception;

  /**
   * 数据操作日志 >>> 新增
   */
  public void saveDataManipulationLog(@Param("eo") DataManipulationLog eo) throws Exception;

  /**
   * 数据操作日志 >>> 批量新增
   */
  public void saveBatchDataManipulationLog(@Param("paging") Paging<?> paging, @Param("eos") Collection<DataManipulationLog> eos) throws Exception;

  /**
   * 文件 >>> 新增
   */
  public void saveFiles(@Param("eo") Files eo) throws Exception;

}
